package com.taxinfo.controller;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class BaseController {
    protected static final String SUCCESS = "success";
    protected static final String ERROR = "error";

    public static String successMessage(String message) {
        return "{\"result\": \"" + SUCCESS + "\", \"message\": \"" + message + "\"}";
    }

    protected Map<String, List<String>> getColumnInfo(String flg) {
        //行次
        List<String> sorted = new ArrayList<String>();
        sorted.add("行次");

        //企业科目名称
        List names = new ArrayList();
        names.add("项目");
        names.add("资产");
        names.add("负债和所有者权益");

        //期初额
        List firtYears = new ArrayList();
        firtYears.add("期初数");
        firtYears.add("年初数");
        firtYears.add("期初余额");
        firtYears.add("年初余额");
        firtYears.add("本期金额");
        firtYears.add("本年累计数");
        firtYears.add("本年累计");
        firtYears.add("上年年末余额");

        //期末额
        List endYears = new ArrayList();
        endYears.add("期末数");
        endYears.add("年末数");
        endYears.add("期末余额");
        endYears.add("上期金额");
        endYears.add("上年同期");
        endYears.add("本月发生额");

        Map<String, List<String>> rtnMap = new HashMap();
        rtnMap.put("sorted",sorted);
        rtnMap.put("names",names);
        rtnMap.put("firtYears",firtYears);
        rtnMap.put("endYears",endYears);
        return rtnMap;
    }

}
